package com.vitabuybuy.tv.ui.tencent.liveroom.roomutil.widget

import android.content.Context
import android.text.Html
import android.view.View
import android.view.animation.Animation
import androidx.core.content.ContextCompat
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.library.common.util.DateUtil
import com.vitabuybuy.tv.adaptebinding.ImageAdapter
import com.vitabuybuy.tv.R
import com.vitabuybuy.tv.databinding.ItemLimitedGroupBinding
import com.vitabuybuy.tv.databinding.PopupAllLimitedGroupBinding
import com.vitabuybuy.tv.dto.GroupBuyMemberDto
import com.library.common.base.BindRecycAdapter
import com.vitabuybuy.tv.databinding.PopupLiveProposalBinding
import razerdp.basepopup.BasePopupWindow
import razerdp.util.animation.AnimationHelper
import razerdp.util.animation.ScaleConfig

class LiveProposalPopup
    (context: Context,
) : BasePopupWindow(context) {


    private lateinit var mBinding: PopupLiveProposalBinding

    override fun onCreateContentView(): View {
        return createPopupById(R.layout.popup_live_proposal)
    }

    override fun onViewCreated(contentView: View) {
        super.onViewCreated(contentView)
        mBinding = DataBindingUtil.bind<ViewDataBinding>(contentView) as PopupLiveProposalBinding
        setViewClickListener(View.OnClickListener { this.dismiss() }, mBinding.ivClose)
    }

    override fun onCreateShowAnimation(): Animation {
        return AnimationHelper.asAnimation()
            .withScale(ScaleConfig.CENTER)
            .toShow()
    }

    override fun onCreateDismissAnimation(): Animation {
        return AnimationHelper.asAnimation()
            .withScale(ScaleConfig.CENTER)
            .toDismiss()
    }
}